package com.zatech.cgnci.project.base.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.Objects;

/**
 * 理赔任务状态
 */
@Getter
@AllArgsConstructor
public enum ClaimTaskStatusEnum {
    INPUT("0", "录入中"),
    CHECKING("1", "审核中"),
    BACK("2", "退回录入"),
    LOG_OFF("3", "已注销"),
    DONE("4", "已完成"),
    ;

    public static ClaimTaskStatusEnum getEnumByCode(String code) {
        return Arrays.stream(values()).filter(e -> Objects.equals(e.getCode(), code)).findAny().orElse(null);
    }

    private String code;
    private String descr;
}
